package com.xty.itgroup.tech05tytex.Mapper.Impl;

import com.xty.itgroup.tech05tytex.Databean.Bean02Customer;
import com.xty.itgroup.tech05tytex.Databean.Bean02CustomerTicket;
import com.xty.itgroup.tech05tytex.Mapper.Mapper02Customer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class Impl02Customer implements Mapper02Customer {
    @Autowired
    private Mapper02Customer customer;

    @Override
    public void addCustomer(Bean02Customer c) {
        customer.addCustomer(c);
    }

    @Override
    public void addCustomerTicket(Bean02CustomerTicket ct) {
        customer.addCustomerTicket(ct);
    }

    @Override
    public List<Bean02CustomerTicket> listTicketInfo(int customer_id) {
        return customer.listTicketInfo(customer_id);
    }

    @Override
    public Bean02CustomerTicket getTicketInfo(int id) {
        return customer.getTicketInfo(id);
    }

    @Override
    public List<Map<String, Object>> simpleListCustomer() {
        return customer.simpleListCustomer();
    }

    @Override
    public List<Bean02Customer> listCustomer(String customer_name,String customer_code,int customer_type) {
        return customer.listCustomer(customer_name==null?"%%":"%"+customer_name+"%", customer_code==null?"%%":"%"+customer_code+"%", customer_type);
    }

    @Override
    public void updateNum(int customer_id) {
        customer.updateNum(customer_id);
    }

    @Override
    public Bean02Customer getCustomer(int customer_id) {
        return customer.getCustomer(customer_id);
    }

    @Override
    public Map<String, Object> getClause(int contract_id) {
        return customer.getClause(contract_id);
    }

    @Override
    public void updateCustomer(Bean02Customer bc) {
        customer.updateCustomer(bc);
    }
}
